interface IVehicle {
  name: string;
  speed: number;
  run(): void;
}
interface ICar extends IVehicle {}

interface ITruck extends IVehicle {
  load: number;
  freightLoad(): void;
}
let su7: ICar = {
  name: "su7",
  speed: 200,
  run() {
    console.log(this.name + "\t" + "run高速行驶中,速度:" + this.speed);
  },
};

su7.run();

let hou8: ITruck = {
  name: "hou8",
  speed: 100,
  load: 100,
  run() {
    console.log(this.name + "\t" + "run高速行驶中,速度:" + this.speed);
  },
  freightLoad() {
    console.log(this.name + "\t" + "载货量:" + this.load + "吨");
  },
};
hou8.run();
hou8.freightLoad();
